package com.sun.service.impl;

import com.sun.dao.UserDao;
import com.sun.pojo.User;
import com.sun.service.UserService;
import com.sun.util.MD5Utils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author: glorysun
 * @date: 2020/8/5
 */
@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserDao userDao;

    //用户名密码是否存在
    @Override
    public User checkUserAndPassword(String username, String password) {
        return userDao.checkUserAndPassword(username, MD5Utils.code(password));
    }
}
